Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext

RE: How to detect attachement existance
~Bill Quetfoochekakol 27.Jan.04 02:57 PM a Web browser
Domino Designer 6.0.1 All Platforms


With regards to preventing editing the document, you have two options:

Provided all "ordinary" users are ACL Author, and the document has an Authors field, containing the user (author name), you could simply remove the user from the authors field.
I suggest having a Computed when composed Text field that records the original author (Call it "CreatedBy"), formula: @UserName

The Authors field should be Authors, Computed, with a formula similar to:
@If(@Attachments = 0; CreatedBy; "");

Which would simply remove editing permissions for the user once the document has been saved with an attachment. A convenient side-effect is that Deletion is also removed.

Note that this method if fail-safe, and still allows users with Editor (or higher) ACL access to still edit/delete documents, thus allowing admin access.

Alternatively, you could use a more involved method:
Enter LotusScript code in the Form QueryOpen event and set Continue=False if Edit mode is requested by a non-admin user on a document with attachments. Enter similar code into the QueryModeChange event to prevent users from switching to edit mode.
Finally, you'll have to catch deletions by entering LotusScript code into the Database event QueryDocumentDelete.
The problem with this last method is that it is not fail-safe. A user can circumvent the code by simply enabling the debugger, and exiting out of thye event handlers, or simply write an agent that performs the deletion.

Hope this is enough to get you going. If you choose the Form event method, search the ND4-5 forum for examples http://www-10.lotus.com/ldd/46dom.nsf/Search?SearchView&Query=queryopen%20and%20querymodechange%20and%20%22continue%3Dfalse%22&SearchOrder=0&Start=1&Count=100




How to detect attachement existance... (~Maria Prerever... 27.Jan.04)
. . RE: How to detect attachement exist... (~Bill Quetfooch... 27.Jan.04)
. . . . RE: How to detect attachement exist... (~Maria Prerever... 27.Jan.04)
. . . . . . RE: How to detect attachement exist... (~Bill Quetfooch... 27.Jan.04)
. . . . . . RE: How to detect attachement exist... (~Lily Nonwether... 27.Jan.04)
. . . . . . . . Why Readers? (~Bill Quetfooch... 27.Jan.04)
. . . . . . . . . . RE: Why Readers? (~Lily Nonwether... 27.Jan.04)
. . . . . . . . . . . . RE: Why Readers? (~Bill Quetfooch... 27.Jan.04)
. . . . . . . . . . . . . . RE: Why Readers? (~Lily Nonwether... 27.Jan.04)
. . . . . . . . . . . . . . . . And what exactly am I going to find... (~Bill Quetfooch... 27.Jan.04)
. . . . . . . . . . . . . . . . . . Ignore last paragraph (~Lily Nonwether... 27.Jan.04)
. . . . . . . . . . . . . . . . . . . . NotesNinjas? Can't believe that sit... (~Delores Dwonic... 27.Jan.04)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS